package com.weds.edpf.core.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.weds.core.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

public class LinkUserchangeLogEntity extends BaseEntity implements Serializable {
    /**
     *
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @ApiModelProperty(required = true, dataType = "int", example = "-1", value = "")
    private Integer xh;

    /**
     *
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @ApiModelProperty(required = true, dataType = "string", example = "test", value = "")
    private Long userSerial;

    /**
     *
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @ApiModelProperty(required = true, dataType = "string", example = "test", value = "")
    private Long oldDep;

    /**
     *
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @ApiModelProperty(required = true, dataType = "string", example = "test", value = "")
    private Long newDep;

    /**
     *
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(required = true, dataType = "string", example = "2020-06-04 15:11:07", value = "")
    private Date sj;

    /**
     *
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @Size(max = 50)
    @ApiModelProperty(required = true, dataType = "string", example = "test", value = "")
    private String glyNo;

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    private static final long serialVersionUID = 1L;

    private String keys;

    /**
     * This method returns the value of the database column link_userchange_log.xh
     *
     * @return the value of link_userchange_log.xh
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public Integer getXh() {
        return xh;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public LinkUserchangeLogEntity withXh(Integer xh) {
        this.setXh(xh);
        return this;
    }

    /**
     * This method sets the value of the database column link_userchange_log.xh
     *
     * @param xh the value for link_userchange_log.xh
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public void setXh(Integer xh) {
        this.xh = xh;
    }

    /**
     * This method returns the value of the database column link_userchange_log.user_serial
     *
     * @return the value of link_userchange_log.user_serial
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public Long getUserSerial() {
        return userSerial;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public LinkUserchangeLogEntity withUserSerial(Long userSerial) {
        this.setUserSerial(userSerial);
        return this;
    }

    /**
     * This method sets the value of the database column link_userchange_log.user_serial
     *
     * @param userSerial the value for link_userchange_log.user_serial
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public void setUserSerial(Long userSerial) {
        this.userSerial = userSerial;
    }

    /**
     * This method returns the value of the database column link_userchange_log.old_dep
     *
     * @return the value of link_userchange_log.old_dep
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public Long getOldDep() {
        return oldDep;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public LinkUserchangeLogEntity withOldDep(Long oldDep) {
        this.setOldDep(oldDep);
        return this;
    }

    /**
     * This method sets the value of the database column link_userchange_log.old_dep
     *
     * @param oldDep the value for link_userchange_log.old_dep
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public void setOldDep(Long oldDep) {
        this.oldDep = oldDep;
    }

    /**
     * This method returns the value of the database column link_userchange_log.new_dep
     *
     * @return the value of link_userchange_log.new_dep
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public Long getNewDep() {
        return newDep;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public LinkUserchangeLogEntity withNewDep(Long newDep) {
        this.setNewDep(newDep);
        return this;
    }

    /**
     * This method sets the value of the database column link_userchange_log.new_dep
     *
     * @param newDep the value for link_userchange_log.new_dep
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public void setNewDep(Long newDep) {
        this.newDep = newDep;
    }

    /**
     * This method returns the value of the database column link_userchange_log.sj
     *
     * @return the value of link_userchange_log.sj
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public Date getSj() {
        return sj;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public LinkUserchangeLogEntity withSj(Date sj) {
        this.setSj(sj);
        return this;
    }

    /**
     * This method sets the value of the database column link_userchange_log.sj
     *
     * @param sj the value for link_userchange_log.sj
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public void setSj(Date sj) {
        this.sj = sj;
    }

    /**
     * This method returns the value of the database column link_userchange_log.gly_no
     *
     * @return the value of link_userchange_log.gly_no
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public String getGlyNo() {
        return glyNo;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public LinkUserchangeLogEntity withGlyNo(String glyNo) {
        this.setGlyNo(glyNo);
        return this;
    }

    /**
     * This method sets the value of the database column link_userchange_log.gly_no
     *
     * @param glyNo the value for link_userchange_log.gly_no
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    public void setGlyNo(String glyNo) {
        this.glyNo = glyNo;
    }

    public String getKeys() {
        return keys;
    }

    public void setKeys(String keys) {
        this.keys = keys;
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", xh=").append(xh);
        sb.append(", userSerial=").append(userSerial);
        sb.append(", oldDep=").append(oldDep);
        sb.append(", newDep=").append(newDep);
        sb.append(", sj=").append(sj);
        sb.append(", glyNo=").append(glyNo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append(", keys=").append(keys);
        sb.append("]");
        return sb.toString();
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        LinkUserchangeLogEntity other = (LinkUserchangeLogEntity) that;
        return (this.getXh() == null ? other.getXh() == null : this.getXh().equals(other.getXh()))
            && (this.getUserSerial() == null ? other.getUserSerial() == null : this.getUserSerial().equals(other.getUserSerial()))
            && (this.getOldDep() == null ? other.getOldDep() == null : this.getOldDep().equals(other.getOldDep()))
            && (this.getNewDep() == null ? other.getNewDep() == null : this.getNewDep().equals(other.getNewDep()))
            && (this.getSj() == null ? other.getSj() == null : this.getSj().equals(other.getSj()))
            && (this.getGlyNo() == null ? other.getGlyNo() == null : this.getGlyNo().equals(other.getGlyNo()));
    }

    /**
     *
     * @mbg.generated Thu Jun 04 15:11:07 CST 2020
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getXh() == null) ? 0 : getXh().hashCode());
        result = prime * result + ((getUserSerial() == null) ? 0 : getUserSerial().hashCode());
        result = prime * result + ((getOldDep() == null) ? 0 : getOldDep().hashCode());
        result = prime * result + ((getNewDep() == null) ? 0 : getNewDep().hashCode());
        result = prime * result + ((getSj() == null) ? 0 : getSj().hashCode());
        result = prime * result + ((getGlyNo() == null) ? 0 : getGlyNo().hashCode());
        return result;
    }
}